<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新增页面</title>
    <!--引入layui-->
    <link rel="stylesheet" th:href="@{/assets/lib/layui/css/layui.css}">
    <script th:src="@{/assets/lib/layui/layui.js}"></script>
    <!--自定义格式-->
    <link rel="stylesheet" th:href="@{/assets/sys/category/add.css}">
    <script th:src="@{/assets/sys/category/add.js}"></script>

    <!--定义上下文路径-->
    <script th:inline="javascript">
        let ctx = /*[[@{/}]]*/"";//上下文路径
        if (ctx.endsWith("/")) {
            ctx = ctx.substring(0, ctx.length - 1);
        }
        let parentCat=/*[[${parentCat}]]*/{};
    </script>
    <style>
        body{margin: 16px;}
        #category-tree{
            width: 260px;
            height: 360px;
            overflow-y:auto ;
        }
    </style>
</head>
<body>
<form id="add-form"  class="layui-form" lay-filter="add-form">
    <div class="layui-form-item">
        <label class="layui-form-label">类别名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="required" lay-reqtext="名称不可为空"
                   placeholder="请输入类别名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">别名</label>
        <div class="layui-input-block">
            <input type="text" name="alias"
                   placeholder="请输入类别别名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <div class="layui-input-block">
            <input type="text" name="iconCls"
                   placeholder="请输入图标" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">序号</label>
        <div class="layui-input-block">
            <input type="number" name="seq" lay-verify="number"
                   placeholder="请输入序号" autocomplete="off" class="layui-input"
                   min="0" step="10" lay-affix="number" value="10">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">父类别</label>
        <div class="layui-input-block">
            <input type="text" name="parentName"
                   placeholder="请选择父类别" autocomplete="off" class="layui-input" readonly>
            <input type="hidden" name="parentId"/>
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea name="description" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>
    </div>


</form>

</body>
</html>